#ifndef XmlParser_h__
#define XmlParser_h__

#include <boost/noncopyable.hpp>
#include <string>
#include "IObject/IPropertyParser.h"

class XmlParser : public IPropertyParser, boost::noncopyable
{
public:
	
public:
	XmlParser();
	virtual ~XmlParser();

	bool		loadFromFile(const std::string& fileName);

	std::string getKeyName(NodeToken token);
	std::string getString(NodeToken token,const std::string& namePath);
	int			getInteger(NodeToken token, const std::string& namePath, int defaultVal = 0);
	double		getFloat(NodeToken token, const std::string& namePath, double defaultVal = 0);
	bool		getBoolean(NodeToken token, const std::string& namePath, bool defaultVal = 0);

	NodeToken getRoot();
	NodeToken GetSubNode(NodeToken pParent, const std::string& namePath);
	NodeToken GetNextNode(NodeToken token, const char * pszKeyName = NULL);

private:
	void* xmlDoc_;
};

#endif // XmlParser_h__
